package com.itheima.springboot_condition;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class SpringbootConditionApplication {

    public static void main(String[] args) {
        //启动程序
        ConfigurableApplicationContext context = SpringApplication.run(SpringbootConditionApplication.class, args);
        //测试加载bean
        /*Object bean = context.getBean("redisTemplate");
        System.out.println(bean);*///第一次测试,没有导入redis依赖,会出错
                                 //第二次测试,已导入redis依赖

        Object user = context.getBean("user");
        System.out.println(user);
    }

}
